package com.app.model.position;


/**
 * Created by Lichaojie on 2017/4/20. It's a beautiful day.
 */
public class UserNearBy implements Comparable<UserNearBy>{
    private long userId;

    private String nickName;

    private String avator;

    private String label;

    private String introduction;

    private double distance;

    public long getUserId() {
        return userId;
    }

    public UserNearBy setUserId(long userId) {
        this.userId = userId;
        return this;
    }

    public String getNickName() {
        return nickName;
    }

    public UserNearBy setNickName(String nickName) {
        this.nickName = nickName;
        return this;
    }

    public String getAvator() {
        return avator;
    }

    public UserNearBy setAvator(String avator) {
        this.avator = avator;
        return this;
    }

    public String getLabel() {
        return label;
    }

    public UserNearBy setLabel(String label) {
        this.label = label;
        return this;
    }

    public String getIntroduction() {
        return introduction;
    }

    public UserNearBy setIntroduction(String introduction) {
        this.introduction = introduction;
        return this;
    }

    public double getDistance() {
        return distance;
    }

    public UserNearBy setDistance(double distance) {
        this.distance = distance;
        return this;
    }

    @Override
    public int compareTo(UserNearBy userNearBy){
        double distance = userNearBy.getDistance();
        if(this.getDistance() - distance > 0){
            return 1;
        }else if(this.getDistance() - distance == 0){
            return 0;
        }else {
            return -1;
        }
    }


}
